package com.talkingdata.hadoop.guard.bean;

public class DataNodeState {
    private int id;                             // 编号
    private String serviceId;                   // 集群namespace 名称
    private String hostname;                    // 主机名
    private int lastContact;                    // 最后一次连接
    private Long numBlocks;                     // 数据块数量
    private Double blockPoolUsedPercent;        // 数据存储 %
    private String adminState;                  // 服务状态
    private Long capacity;                      // 总存储量
    private int volfails;                       // 故障盘数量
    private String failedStorageIds;            // 故障盘描述
    private long lastVolumeFailureDate;         // 故障时间
    private String timestamp;                   // 时间戳

    @Override
    public String toString() {
        return "DataNodeState{" +
                "serviceId='" + serviceId + '\'' +
                ", hostname='" + hostname + '\'' +
                ", lastContact=" + lastContact +
                ", numBlocks=" + numBlocks +
                ", blockPoolUsedPercent=" + blockPoolUsedPercent +
                ", adminState='" + adminState + '\'' +
                ", capacity=" + capacity +
                ", volfails=" + volfails +
                ", failedStorageIds='" + failedStorageIds + '\'' +
                ", lastVolumeFailureDate=" + lastVolumeFailureDate +
                ", timestamp='" + timestamp + '\'' +
                '}';
    }

    public DataNodeState(String serviceId, String hostname, int lastContact, Long numBlocks, Double blockPoolUsedPercent, String adminState, Long capacity, int volfails, String failedStorageIds, long lastVolumeFailureDate, String timestamp) {
        this.serviceId = serviceId;
        this.hostname = hostname;
        this.lastContact = lastContact;
        this.numBlocks = numBlocks;
        this.blockPoolUsedPercent = blockPoolUsedPercent;
        this.adminState = adminState;
        this.capacity = capacity;
        this.volfails = volfails;
        this.failedStorageIds = failedStorageIds;
        this.lastVolumeFailureDate = lastVolumeFailureDate;
        this.timestamp = timestamp;
    }

    public String getFailedStorageIds() {
        return failedStorageIds;
    }

    public void setFailedStorageIds(String failedStorageIds) {
        this.failedStorageIds = failedStorageIds;
    }

    public int getVolfails() {
        return volfails;
    }

    public void setVolfails(int volfails) {
        this.volfails = volfails;
    }

    public long getLastVolumeFailureDate() {
        return lastVolumeFailureDate;
    }

    public void setLastVolumeFailureDate(long lastVolumeFailureDate) {
        this.lastVolumeFailureDate = lastVolumeFailureDate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getHostname() {
        return hostname;
    }

    public void setHostname(String hostname) {
        this.hostname = hostname;
    }

    public int getLastContact() {
        return lastContact;
    }

    public void setLastContact(int lastContact) {
        this.lastContact = lastContact;
    }

    public Long getNumBlocks() {
        return numBlocks;
    }

    public void setNumBlocks(Long numBlocks) {
        this.numBlocks = numBlocks;
    }

    public Double getBlockPoolUsedPercent() {
        return blockPoolUsedPercent;
    }

    public void setBlockPoolUsedPercent(Double blockPoolUsedPercent) {
        this.blockPoolUsedPercent = blockPoolUsedPercent;
    }

    public String getAdminState() {
        return adminState;
    }

    public void setAdminState(String adminState) {
        this.adminState = adminState;
    }

    public Long getCapacity() {
        return capacity;
    }

    public void setCapacity(Long capacity) {
        this.capacity = capacity;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public DataNodeState() {
    }
}
